1. Field of the Invention
The present invention relates to a RAID apparatus, a RAID control program, and a cache management method that temporarily store a data block to be written to a magnetic disk in a cache, and more particularly, to a RAID apparatus, a RAID control program, and a cache management method that can suppress increase in processing time of managing a cache, even when it is a large capacity cache.
2. Description of the Related Art
Redundant arrays of independent disks (RAID) apparatuses and the like generally include a cache for increasing reply speed in regard to requests from a host. For example, when a host makes a request to write a data block, the RAID apparatus stores the data block of the write request in the cache, and at this stage replies by informing the host that the write is complete. The RAID apparatus then executes a process of writing to a magnetic disk apparatus at a predetermined timing.
By delaying writing to the magnetic disk apparatus, which has a slower operating speed than a central processing unit (CPU) of the host, and replying that writing is completed when storing in the cache in this manner, the process waiting time of the host is reduced and the performance of the overall system is enhanced.
The cache also increases the reply speed in regard to read requests from the host, and, while it is preferable to store as many data blocks as possible in the cache to enhance performance, the capacity of the cache is limited. Accordingly, many RAID apparatuses effectively use a limited capacity of a cache by managing data blocks stored in the cache based on least recently used (LRU) logic (for example, see Japanese Patent Application Laid-open Nos. 2003-228461 and H11-338775).
Data accesses by various programs that operate on a host are known to have locality, and there is a higher possibility that data blocks which have not been stored for a long time in the cache will be accessed again from the host. By using the LRU logic, priority can be given to data blocks having a low possibility of an access request from the host in removing them from the cache, enabling the limited capacity of cache to be used effectively.
Recently, however, there are increasing demands to enhance the performance of RAID apparatuses, and RAID apparatus including large capacity caches of 100 gigabytes or more are appearing. Although processing time of data block management based on the LRU logic has been conventionally as small as to be negligible, the large capacity of such caches and the increasing numbers of data blocks stored in them are tending to considerably influence the processing performance.